//
//  LQBaseCache.h
//  LQBaseKit
//
//  Created by 戴志朋 on 15/10/26.
//  Copyright © 2015年 hzdracom. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

typedef void(^cachePercentBlock)(CGFloat percent,NSError *error);
typedef void(^cacheFinishBlock)();

@interface LQBaseCache : NSObject

@property (nonatomic,strong,readonly) NSCache *memoryCache;

+ (LQBaseCache*)sharedCache;

- (uint64_t)sizeOfCacheInDisk;

- (void)setObject:(id<NSCoding>)object
           forKey:(NSString*)key;

- (id)objectForKey:(NSString*)key;

- (void)removeAllDiskWithPercentBlock:(cachePercentBlock)percentblock
                          finishBlock:(cacheFinishBlock)finishblock;

@end
